<!-- BEGIN header -->
<div id="header">
     <div id="login-block">
    <%- if logged_in? || logged_in_as_admin? -%>
      <%= render :partial => 'session/greeting' -%>
    <% else -%>
      <ul id="greeting" class="logged-out">
        <li>
  		    <%= render :partial => 'session/login' -%>
          <a id='signin_closed' onclick='toggleLogin("signin")' style='display:none;'><%=h 'Sign in'.t %></a>
          <a id='signin_open' onclick='toggleLogin("signin")'><%=h 'Cancel'.t %></a>
		    </li>
      </ul>
    <% end -%>
    <%= render :partial => 'works/search_box' %>
  </div>
<h1><%= link_to ArchiveConfig.APP_NAME.t, root_path %>
  	<span><%= ArchiveConfig.APPNAME -%>
     <% unless ArchiveConfig.REVISION.blank? %>(<span>rev. <%= ArchiveConfig.REVISION %></span>)<% end %></span>
  </h1>
  
  <ul id="main-navigation">
		<li>
      <%= home_link %>
    </li>
	  <li>
      <%= link_to_unless_current "<span>" + "works".t + "</span>", works_path %>
    </li>
    <li>
      <%= link_to_unless_current "<span>" + "fandoms".t + "</span>", media_path %>
    </li>
    <li>
      <%= link_to_unless_current "<span>" + "people".t + "</span>", users_path %>
    </li>
    <li>
      <%= link_to_help "coming-soon", "<span>" + "communities".t + "</span>" %>
    </li>
    <li>
      <%= link_to_unless_current "<span>" + "recs".t + "</span>", bookmarks_path %>
    </li>
    <li>
      <%= link_to_unless_current "<span>" + "tags".t + "</span>", tags_path %>
    </li>
    
    <%- if logged_in_as_admin? -%>
      <%= render :partial => 'admin/header' -%>
    <%- end -%>
  </ul>
  <hr class="clear" />
</div>

<!-- END header -->

